package com.pmcc.cj.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.core.entity.UUIDEntity;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 零售商认证表
 * Created by tomas on 2020/9/5.
 */
@Entity
@Table(name = "cj_retailer")
public class CjRetailer extends UUIDEntity {
    @Column(name = "employee_id")
    private String employeeId;//申请人id
    @Column(name = "username")
    private String username;//姓名
    @Column(name = "activation_code")
    private String activationCode;//激活码
    @Column(name = "name")
    private String name;//店铺名称
    @Column(name = "image_id")
    private String imageId;//资质照片id
    @Column(name = "card_id")
    private String cardId;//身份证号
    @Column(name = "positive_card")
    private String positiveCard;//身份证正面
    @Column(name = "back_card")
    private String backCard;//身份证反面
    @Column(name = "image1")
    private String image1;//农药销售许可证
    @Column(name = "image2")
    private String image2;//门头照片
    @Column(name = "address")
    private String address;//店铺详细地址（根据激活码自动匹配省市县）可以补充一个更详细的地址如门牌号
    @Column(name = "xx")
    private Double xx;//经度坐标
    @Column(name = "yy")
    private Double yy;//纬度坐标
    //审核状态  0：审核中    1：已审核  2：被拒绝
    @Column(name = "fettle")
    private Integer fettle;
//    @Column(name = "verify_id")   姚楠说后台就一个人负责，不需要审核人
//    private String verifyId;//审核人id
    @Column(name = "submit_time")
    private Date submitTime;//认证提交时间
//    @Column(name = "verify_name")
//    private String verifyName;//审核人姓名
    @Column(name = "verify_time")
    private Date verifyTime;//审核人时间
//    @Column(name = "verify_result")
//    private Integer verifyResult;//审核结果
    @Column(name = "salesman_id")
    private String salesmanId;//业务员id
    @Column(name = "salesman_name")
    private String salesmanName;//业务员姓名

    public String getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getActivationCode() {
        return activationCode;
    }

    public void setActivationCode(String activationCode) {
        this.activationCode = activationCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImageId() {
        return imageId;
    }

    public void setImageId(String imageId) {
        this.imageId = imageId;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getPositiveCard() {
        return positiveCard;
    }

    public void setPositiveCard(String positiveCard) {
        this.positiveCard = positiveCard;
    }

    public String getBackCard() {
        return backCard;
    }

    public void setBackCard(String backCard) {
        this.backCard = backCard;
    }

    public String getImage1() {
        return image1;
    }

    public void setImage1(String image1) {
        this.image1 = image1;
    }

    public String getImage2() {
        return image2;
    }

    public void setImage2(String image2) {
        this.image2 = image2;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Double getXx() {
        return xx;
    }

    public void setXx(Double xx) {
        this.xx = xx;
    }

    public Double getYy() {
        return yy;
    }

    public void setYy(Double yy) {
        this.yy = yy;
    }

    public Integer getFettle() {
        return fettle;
    }

    public void setFettle(Integer fettle) {
        this.fettle = fettle;
    }


    @JsonSerialize(using = DateTimeFormat.class)
    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    @JsonSerialize(using = DateTimeFormat.class)
    public Date getVerifyTime() {
        return verifyTime;
    }

    public void setVerifyTime(Date verifyTime) {
        this.verifyTime = verifyTime;
    }

    public String getSalesmanId() {
        return salesmanId;
    }

    public void setSalesmanId(String salesmanId) {
        this.salesmanId = salesmanId;
    }

    public String getSalesmanName() {
        return salesmanName;
    }

    public void setSalesmanName(String salesmanName) {
        this.salesmanName = salesmanName;
    }
}
